from selenium.webdriver.common.by import By
from UI自动化基础框架.base_page import BasePage
from UI自动化基础框架.setting import TEST_URL
class LoginPage(BasePage):
    URL =TEST_URL
    USERNAME = (By.ID,"username")
    PASSWORD = (By.ID,"password")
    def __init__(self,driver):
        super().__init__(driver=driver,url=self.URL)

    def login(self,username,password):
        self.open()
        self.send_keys(webElement=self.find_element(*self.USERNAME,timeout=10),keys=username)
        self.send_keys(webElement=self.find_element(*self.PASSWORD),keys=password)


        